/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cput.tp.patterns.structural.flyweight;

/**
 *
 * @author Malotana
 */
public class FlyweightMultiplier implements FlyWeight{
    String operation;
    public FlyweightMultiplier(){
       operation = "multiply";
       try{
           Thread.sleep(3000);
       } catch(InterruptedException e){
           e.printStackTrace();
       }
   }
    
    @Override
    public void doMath(int a, int b) {
        System.out.println(operation+"  "+a+"  and  "+b+" : "+(a*b));
    }
}
